using System;
using System.Collections;
using System.Collections.Generic;
using EGEngine;
using UnityEngine;

public class GameEntry : MonoBehaviour
{
    public NetworkModule NetworkModuleInstance;

    // Start is called before the first frame update
    void Start()
    {
        EventModule.Register(this);
        NetworkModuleInstance.Init(null);
    }

    public void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            // EventModule.BroadCast(1, 123);
            NetworkModule.ConnectToServerAsync();
        }

        if (Input.GetMouseButtonDown(1))
        {
            // EventModule.Unregister(this);
            NetworkModule.DisconnectFromServer();
        }
    }

    [EventMethod(1)]
    public void Test(int a)
    {
        Debug.Log(a);
    }
}